bitkeeper revision 1.1236.49.4 (424daeb9mhwcMe-HsktqHZfvMFrb0A)
authordjm@sportsman.spdomain <djm@sportsman.spdomain>
Fri, 1 Apr 2005 20:27:37 +0000 (20:27 +0000)
committerdjm@sportsman.spdomain <djm@sportsman.spdomain>
Fri, 1 Apr 2005 20:27:37 +0000 (20:27 +0000)
ia64: update xen address space for VTi compatibility

12 files changed:
.rootkeys
xen/arch/ia64/domain.c
xen/arch/ia64/patch/linux-2.6.7/entry.S
xen/arch/ia64/patch/linux-2.6.7/head.S
xen/arch/ia64/patch/linux-2.6.7/ivt.S
xen/arch/ia64/patch/linux-2.6.7/mca_asm.h [new file with mode: 0644]
xen/arch/ia64/patch/linux-2.6.7/minstate.h
xen/arch/ia64/patch/linux-2.6.7/page.h
xen/arch/ia64/patch/linux-2.6.7/pal.S [new file with mode: 0644]
xen/arch/ia64/patch/linux-2.6.7/system.h
xen/arch/ia64/tools/mkbuildtree
xen/arch/ia64/xenasm.S

index c93eea13ace27e7adc445849e83e92f1960b07a7..eda26714db508ad68373a56d96897198a7366f7a 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
 421098b4weyd0AQTjPLmooChUJm13Q xen/arch/ia64/patch/linux-2.6.7/kregs.h
 421098b4vHCejAUPem4w8p5V-AD1Ig xen/arch/ia64/patch/linux-2.6.7/lds.S
 421098b4uooGl5X8zZM96qpmS0Furg xen/arch/ia64/patch/linux-2.6.7/linuxtime.h
+424dad01Txy4dcgKHGkTx1L2z7GuQA xen/arch/ia64/patch/linux-2.6.7/mca_asm.h
 421098b4awnw3Jf23gohJWoK8s7-Qg xen/arch/ia64/patch/linux-2.6.7/minstate.h
 421098b5hIfMbZlQTfrOKN4BtzJgDQ xen/arch/ia64/patch/linux-2.6.7/mm_bootmem.c
 421098b53IVBoQPcDjFciZy86YEhRQ xen/arch/ia64/patch/linux-2.6.7/mm_contig.c
 421098b5pZw41QuBTvhjvSol6aAHDw xen/arch/ia64/patch/linux-2.6.7/mmzone.h
 421098b5B_dClZDGuPYeY3IXo8Hlbw xen/arch/ia64/patch/linux-2.6.7/page.h
 421098b5saClfxPj36l47H9Um7h1Fw xen/arch/ia64/patch/linux-2.6.7/page_alloc.c
+424dab78_JGGpJDaAb6ZtkPJAkAKOA xen/arch/ia64/patch/linux-2.6.7/pal.S
 4241ed05l9ZdG7Aj0tygIxIwPRXhog xen/arch/ia64/patch/linux-2.6.7/pgalloc.h
 421098b5OkmcjMBq8gxs7ZrTa4Ao6g xen/arch/ia64/patch/linux-2.6.7/processor.h
 421098b51RLB6jWr6rIlpB2SNObxZg xen/arch/ia64/patch/linux-2.6.7/sal.h
index 387c7928ce15f7362d91670663242f60fa093690..96f93740833c63c2b739d1a5ba87172f9ad82531 100644 (file)
@@ -194,9 +194,9 @@ void arch_do_createdomain(struct exec_domain *ed)
        if (!allocate_rid_range(d,DOMAIN_RID_BITS_DEFAULT)) // FIXME
                BUG();
        // the following will eventually need to be negotiated dynamically
-       d->xen_vastart = 0xfffc000000000000;
-       d->xen_vaend = 0xfffe000000000000;
-       d->shared_info_va = 0xfffd000000000000;
+       d->xen_vastart = 0xf000000000000000;
+       d->xen_vaend = 0xf300000000000000;
+       d->shared_info_va = 0xf100000000000000;
        d->breakimm = 0x1000;
        // stay on kernel stack because may get interrupts!
        // ia64_ret_from_clone (which b0 gets in new_thread) switches
index 4e449ffb5cfe0b7458f82915de80ee1aacce0bff..c163008f278a5d26858552c55a0584280e5cefb2 100644 (file)
@@ -1,5 +1,5 @@
---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/entry.S    2005-01-23 13:23:36.000000000 -0700
-+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/entry.S       2004-12-17 13:47:03.000000000 -0700
+--- ../../linux-2.6.7/arch/ia64/kernel/entry.S 2005-03-24 19:39:56.000000000 -0700
++++ arch/ia64/entry.S  2005-04-01 12:56:01.000000000 -0700
 @@ -35,7 +35,9 @@
  
  #include <asm/asmmacro.h>
@@ -46,7 +46,7 @@
        mov r27=IA64_KR(CURRENT_STACK)
        adds r21=IA64_TASK_THREAD_KSP_OFFSET,in0
 -      dep r20=0,in0,61,3              // physical address of "current"
-+      dep r20=0,in0,50,14             // physical address of "current"
++      dep r20=0,in0,60,4              // physical address of "current"
        ;;
        st8 [r22]=sp                    // save kernel stack pointer of old task
        shr.u r26=r20,IA64_GRANULE_SHIFT
index 1f777b612a8647324af28ce103634dd379229c49..007f0f77fce0c6538ba358f2a137f724d212f0eb 100644 (file)
@@ -1,5 +1,5 @@
---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/head.S     2005-01-23 13:23:36.000000000 -0700
-+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/head.S        2004-12-17 13:47:03.000000000 -0700
+--- ../../linux-2.6.7/arch/ia64/kernel/head.S  2005-03-24 19:39:56.000000000 -0700
++++ arch/ia64/head.S   2005-04-01 12:56:01.000000000 -0700
 @@ -1,3 +1,8 @@
 +#ifdef XEN
 +#define       console_print   printf
@@ -14,7 +14,7 @@
        ;;
        or r18=r17,r18
 +#ifdef XEN
-+      dep r2=-1,r3,50,14      // IMVA of task
++      dep r2=-1,r3,60,4       // IMVA of task
 +#else
        dep r2=-1,r3,61,3       // IMVA of task
 +#endif
@@ -26,7 +26,7 @@
        mov ar.rsc=0x3          // place RSE in eager mode
  
 +#ifdef XEN
-+(isBP)        dep r28=-1,r28,50,14    // make address virtual
++(isBP)        dep r28=-1,r28,60,4     // make address virtual
 +#else
  (isBP)        dep r28=-1,r28,61,3     // make address virtual
 +#endif
@@ -69,8 +69,8 @@
        dep r3=0,r3,KERNEL_TR_PAGE_SHIFT,64-KERNEL_TR_PAGE_SHIFT
        dep r14=0,r14,KERNEL_TR_PAGE_SHIFT,64-KERNEL_TR_PAGE_SHIFT
 +#ifdef XEN
-+      dep r17=-1,r17,50,14
-+      dep sp=-1,sp,50,14
++      dep r17=-1,r17,60,4
++      dep sp=-1,sp,60,4
 +#else
        dep r17=-1,r17,61,3
        dep sp=-1,sp,61,3
index 081a605e6df2349b3463b7fde81648bbea9f8c4a..83909bb110aa4d869fd7fe70e70e17e123df547f 100644 (file)
@@ -1,5 +1,5 @@
 --- ../../linux-2.6.7/arch/ia64/kernel/ivt.S   2004-06-15 23:18:59.000000000 -0600
-+++ arch/ia64/ivt.S    2005-03-28 20:16:02.000000000 -0700
++++ arch/ia64/ivt.S    2005-04-01 12:56:01.000000000 -0700
 @@ -1,3 +1,21 @@
 +
 +#ifdef XEN
 +#ifdef XEN
 +      ;;
 +      // FIXME: inadequate test, this is where we test for Xen address
-+      // note that 0xfffc (cached) and 0xdffc (uncached) addresses
++      // note that 0xf000 (cached) and 0xd000 (uncached) addresses
 +      // should be OK.  (Though no I/O is done in Xen, EFI needs uncached
 +      // addresses and some domain EFI calls are passed through)
-+      tbit.nz p0,p8=r16,50
++      tbit.nz p0,p8=r16,60
 +(p8)  br.cond.spnt page_fault
 +//(p8)        br.cond.spnt 0
 +      ;;
diff --git a/xen/arch/ia64/patch/linux-2.6.7/mca_asm.h b/xen/arch/ia64/patch/linux-2.6.7/mca_asm.h
new file mode 100644 (file)
index 0000000..35e5bce
--- /dev/null
@@ -0,0 +1,32 @@
+--- ../../linux-2.6.7/include/asm-ia64/mca_asm.h       2004-06-15 23:20:03.000000000 -0600
++++ include/asm-ia64/mca_asm.h 2005-04-01 12:56:37.000000000 -0700
+@@ -26,8 +26,13 @@
+  * direct mapped to physical addresses.
+  *    1. Lop off bits 61 thru 63 in the virtual address
+  */
++#ifdef XEN
++#define INST_VA_TO_PA(addr)                                                   \
++      dep     addr    = 0, addr, 60, 4
++#else // XEN
+ #define INST_VA_TO_PA(addr)                                                   \
+       dep     addr    = 0, addr, 61, 3
++#endif // XEN
+ /*
+  * This macro converts a data virtual address to a physical address
+  * Right now for simulation purposes the virtual addresses are
+@@ -42,9 +47,15 @@
+  * direct mapped to physical addresses.
+  *    1. Put 0x7 in bits 61 thru 63.
+  */
++#ifdef XEN
++#define DATA_PA_TO_VA(addr,temp)                                                      \
++      mov     temp    = 0xf   ;;                                                      \
++      dep     addr    = temp, addr, 60, 4
++#else // XEN
+ #define DATA_PA_TO_VA(addr,temp)                                                      \
+       mov     temp    = 0x7   ;;                                                      \
+       dep     addr    = temp, addr, 61, 3
++#endif // XEN
+ /*
+  * This macro jumps to the instruction at the given virtual address
index 622e8128746d142475c0b90c5a2d12162c4f2037..f73a8d38746de32f6057f642bc203d4b6deb22c9 100644 (file)
@@ -1,14 +1,29 @@
---- /home/djm/src/xen/xeno-ia64.bk/xen/linux-2.6.7/arch/ia64/kernel/minstate.h 2004-06-15 23:19:52.000000000 -0600
-+++ /home/djm/src/xen/xeno-ia64.bk/xen/arch/ia64/minstate.h    2004-12-15 16:36:00.000000000 -0700
-@@ -3,6 +3,11 @@
- #include <asm/cache.h>
+--- ../../linux-2.6.7/arch/ia64/kernel/minstate.h      2004-06-15 23:19:52.000000000 -0600
++++ arch/ia64/minstate.h       2005-04-01 12:56:01.000000000 -0700
+@@ -45,7 +45,7 @@
+ (pKStk) tpa r1=sp;                            /* compute physical addr of sp  */              \
+ (pUStk)       addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r1;   /* compute base of memory stack */      \
+ (pUStk)       mov r23=ar.bspstore;                            /* save ar.bspstore */                  \
+-(pUStk)       dep r22=-1,r22,61,3;                    /* compute kernel virtual addr of RBS */        \
++(pUStk)       dep r22=-1,r22,60,4;                    /* compute kernel virtual addr of RBS */        \
+       ;;                                                                                      \
+ (pKStk) addl r1=-IA64_PT_REGS_SIZE,r1;                /* if in kernel mode, use sp (r12) */           \
+ (pUStk)       mov ar.bspstore=r22;                    /* switch to kernel RBS */                      \
+@@ -65,7 +65,7 @@
+ #endif
  
- #include "entry.h"
-+#ifdef XEN
-+//this can be removed when offsets.h is properly generated
-+#undef IA64_TASK_THREAD_ON_USTACK_OFFSET
-+#define IA64_TASK_THREAD_ON_USTACK_OFFSET 0x34
-+#endif
- /*
-  * For ivt.s we want to access the stack virtually so we don't have to disable translation
+ #ifdef MINSTATE_PHYS
+-# define MINSTATE_GET_CURRENT(reg)    mov reg=IA64_KR(CURRENT);; dep reg=0,reg,61,3
++# define MINSTATE_GET_CURRENT(reg)    mov reg=IA64_KR(CURRENT);; dep reg=0,reg,60,4
+ # define MINSTATE_START_SAVE_MIN      MINSTATE_START_SAVE_MIN_PHYS
+ # define MINSTATE_END_SAVE_MIN                MINSTATE_END_SAVE_MIN_PHYS
+ #endif
+@@ -172,7 +172,7 @@
+       ;;                                                                                      \
+ .mem.offset 0,0; st8.spill [r16]=r15,16;                                                      \
+ .mem.offset 8,0; st8.spill [r17]=r14,16;                                                      \
+-      dep r14=-1,r0,61,3;                                                                     \
++      dep r14=-1,r0,60,4;                                                                     \
+       ;;                                                                                      \
+ .mem.offset 0,0; st8.spill [r16]=r2,16;                                                               \
+ .mem.offset 8,0; st8.spill [r17]=r3,16;                                                               \
index 826324e6581917db1a4eccbf4e098916e89f9584..c21288702443b2e4ec3cb3a3da3c65d928d12ade 100644 (file)
@@ -1,5 +1,5 @@
 --- ../../linux-2.6.7/include/asm-ia64/page.h  2004-06-15 23:18:58.000000000 -0600
-+++ include/asm-ia64/page.h    2005-03-23 14:54:11.000000000 -0700
++++ include/asm-ia64/page.h    2005-04-01 12:56:37.000000000 -0700
 @@ -12,6 +12,9 @@
  #include <asm/intrinsics.h>
  #include <asm/types.h>
@@ -43,8 +43,8 @@
 +#ifdef XEN
 +typedef union xen_va {
 +      struct {
-+              unsigned long off : 50;
-+              unsigned long reg : 14;
++              unsigned long off : 60;
++              unsigned long reg : 4;
 +      } f;
 +      unsigned long l;
 +      void *p;
@@ -67,7 +67,7 @@
  #endif /* !STRICT_MM_TYPECHECKS */
  
 +#ifdef XEN
-+#define PAGE_OFFSET                   0xfffc000000000000
++#define PAGE_OFFSET                   0xf000000000000000
 +#else
  #define PAGE_OFFSET                   0xe000000000000000
 +#endif
diff --git a/xen/arch/ia64/patch/linux-2.6.7/pal.S b/xen/arch/ia64/patch/linux-2.6.7/pal.S
new file mode 100644 (file)
index 0000000..94519e6
--- /dev/null
@@ -0,0 +1,26 @@
+--- ../../linux-2.6.7/arch/ia64/kernel/pal.S   2004-06-15 23:20:25.000000000 -0600
++++ arch/ia64/pal.S    2005-04-01 12:56:01.000000000 -0700
+@@ -163,7 +163,11 @@
+       adds r8  = 1f-1b,r8             // calculate return address for call
+       ;;
+       mov loc4=ar.rsc                 // save RSE configuration
++#ifdef XEN
++      dep.z loc2=loc2,0,60            // convert pal entry point to physical
++#else // XEN
+       dep.z loc2=loc2,0,61            // convert pal entry point to physical
++#endif // XEN
+       tpa r8=r8                       // convert rp to physical
+       ;;
+       mov b7 = loc2                   // install target to branch reg
+@@ -218,7 +222,11 @@
+       mov loc3 = psr          // save psr
+       ;;
+       mov loc4=ar.rsc                 // save RSE configuration
++#ifdef XEN
++      dep.z loc2=loc2,0,60            // convert pal entry point to physical
++#else // XEN
+       dep.z loc2=loc2,0,61            // convert pal entry point to physical
++#endif // XEN
+       ;;
+       mov ar.rsc=0                    // put RSE in enforced lazy, LE mode
+       movl r16=PAL_PSR_BITS_TO_CLEAR
index f0209984a5b77307e41704b903a903cb9c1392f1..ab1516ef7a2bf9997cc6f0436d096a5faaaa476f 100644 (file)
@@ -1,15 +1,15 @@
---- ../../linux-2.6.7/include/asm-ia64/system.h        2005-01-31 11:15:23.000000000 -0700
-+++ include/asm-ia64/system.h  2005-03-14 11:31:12.000000000 -0700
+--- ../../linux-2.6.7/include/asm-ia64/system.h        2005-03-24 19:39:56.000000000 -0700
++++ include/asm-ia64/system.h  2005-04-01 12:56:37.000000000 -0700
 @@ -24,8 +24,16 @@
   * 0xa000000000000000+2*PERCPU_PAGE_SIZE
   * - 0xa000000000000000+3*PERCPU_PAGE_SIZE remain unmapped (guard page)
   */
 +#ifdef XEN
-+//#define KERNEL_START                 0xfffc000100000000
-+#define KERNEL_START           0xfffc000004000000
-+#define PERCPU_ADDR            0xfffd000000000000-PERCPU_PAGE_SIZE
-+#define SHAREDINFO_ADDR                0xfffd000000000000
-+#define VHPT_ADDR              0xfffe000000000000
++//#define KERNEL_START                 0xf000000100000000
++#define KERNEL_START           0xf000000004000000
++#define PERCPU_ADDR            0xf100000000000000-PERCPU_PAGE_SIZE
++#define SHAREDINFO_ADDR                0xf100000000000000
++#define VHPT_ADDR              0xf200000000000000
 +#else
  #define KERNEL_START           0xa000000100000000
  #define PERCPU_ADDR           (-PERCPU_PAGE_SIZE)
index 625f0b05c0e31e981d0c25e7ec9343558bf1c5ff..a03bcaf4db78ad3229a6d8d364d09593a5f4f1fe 100644 (file)
@@ -112,7 +112,8 @@ softlink arch/ia64/kernel/ia64_ksyms.c arch/ia64/ia64_ksyms.c
 softlink arch/ia64/kernel/irq_lsapic.c arch/ia64/irq_lsapic.c
 softlink arch/ia64/kernel/machvec.c arch/ia64/machvec.c
 softlink arch/ia64/mm/extable.c arch/ia64/extable.c
-softlink arch/ia64/kernel/pal.S arch/ia64/pal.S
+#softlink arch/ia64/kernel/pal.S arch/ia64/pal.S
+cp_patch arch/ia64/kernel/pal.S arch/ia64/pal.S pal.S
 softlink arch/ia64/kernel/patch.c arch/ia64/patch.c
 softlink arch/ia64/kernel/sal.c arch/ia64/sal.c
 softlink arch/ia64/kernel/minstate.h arch/ia64/minstate.h
@@ -213,7 +214,8 @@ softlink include/asm-ia64/ioctl.h include/asm-ia64/ioctl.h
 softlink include/asm-ia64/linkage.h include/asm-ia64/linkage.h
 softlink include/asm-ia64/machvec.h include/asm-ia64/machvec.h
 softlink include/asm-ia64/machvec_hpsim.h include/asm-ia64/machvec_hpsim.h
-softlink include/asm-ia64/mca_asm.h include/asm-ia64/mca_asm.h
+#softlink include/asm-ia64/mca_asm.h include/asm-ia64/mca_asm.h
+cp_patch include/asm-ia64/mca_asm.h include/asm-ia64/mca_asm.h mca_asm.h
 softlink include/asm-ia64/mca.h include/asm-ia64/mca.h
 softlink include/asm-ia64/meminit.h include/asm-ia64/meminit.h
 softlink include/asm-ia64/mman.h include/asm-ia64/mman.h
index 9154339c9ffe6d15689d3bcbf2b0149f3d6963eb..394b08f604f5616e1bb053307f4629e6ba5bf8a4 100644 (file)
@@ -132,7 +132,7 @@ GLOBAL_ENTRY(ia64_new_rr7)
 (p7)   br.cond.sptk    .stack_overlaps
        ;;
        movl r25=PAGE_KERNEL
-       dep r20=0,r13,50,14             // physical address of "current"
+       dep r20=0,r13,60,4              // physical address of "current"
        ;;
        or r23=r25,r20                  // construct PA | page properties
        mov r25=IA64_GRANULE_SHIFT<<2